#include "InputAction.h"

void cInputAction::Init() {
	float mfValue = 0.0f;
	float mfTimePressed = 0.0f;
	bool mbIsPressed = false;
	bool mbWasPressed = false;
	bool mbBecomeReleased = false;
	bool mbBecomePressed = false;
}

void cInputAction::Update(float lfTimeStep, float lfValue) {
	mbWasPressed = mbIsPressed;
	mbIsPressed = (lfValue > 0.0f);

	if (mbIsPressed && mbWasPressed) 
		mfTimePressed += lfTimeStep; 
	else
		mfTimePressed = 0.0f;

	mbBecomePressed = (mbIsPressed && !mbWasPressed);
	mbBecomeReleased = (mbWasPressed && !mbIsPressed);

	mfValue = lfValue;
}